#ifndef _VIEWPORT_H_
#define _VIEWPORT_H_
#include "Utils.h"
#include <d3dx9.h>
#include "ViewPortUpdate.h"
#include "ViewPortUpdateHorizontal.h"
#include "ViewPortUpdateVertical.h"
#include "ViewPortData.h"

class CViewPort
{
public:
	ViewPortUpdate* viewportupdate;
	ViewPortUpdateHorizontal* viewportupdatehorizontal;
	ViewPortUpdateVertical* viewportupdatevertical;

	ViewPortData* _data;

	CViewPort();
	CViewPort(double X, double Y, int Width, int Height);
	~CViewPort();

	double getLeft();
	double getright();
	double getTop();
	double getBottom();
	double getX() {return _data->X;}
	double getY() {return _data->Y;}
	Rect* getCurView() {return _data->CurView;}
	Rect* getQuadTreeView();
	void SetBound(Rect Rect);
	void Move(D3DXVECTOR2 NewPosition, int MapWidth, int MapHeight);
	void setTarget(Rect* targetRect);
	void update();
	void updateSettings(double heightLimit, double widthLimit, double delteToMoveHeight);
	void setViewPort(bool isHorizontal);
	void setPosition(double x, double y);
private:
	
	
};


#endif